home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PASCAL
/
0191.ZIP
/
PGM-AIDE.DVR
< prev
next >
Wrap
Text File
|
1985-09-29
|
3KB
|
83 lines
{-------------------------------------------------------------------------}
{ PGM-AIDE.DVR }
{-------------------------------------------------------------------------}
{ Copyright 1985 }
{ by Lynn A. Canning }
{ 9107 Grandview Dr. }
{ Overland Park, Ks. 66212 }
{ }
{ This routine was placed in the public domain by the author }
{-------------------------------------------------------------------------}
Var
ch :char;
cx,cy :byte;
{-------------------------------------------------------------------------}
{ Check for Printer Ready }
{-------------------------------------------------------------------------}
procedure check_printer;
begin
with regs do begin
ax := $02 shl 8; {Set for service 2}
dx := $0000; {Set printer number}
end;
Intr($17,regs); {invoke interrupt 23}
if halfregs.ah <> 144 then begin {if not = 144 then printer not ready}
ch := ' ';
MkWin(26,12,54,18,2,4,0);
gotoxy(1,2);
Writeln(' Printer not ready');
Writeln(' Set up printer and retry');
TimeDelay(3);
RmWin;
end;
end;
{-------------------------------------------------------------------------}
{ Display Program Aide Menu }
{-------------------------------------------------------------------------}
procedure init_window;
begin
MkWin(17,5,63,20,2,6,0);
ClrScr;
gotoxy(1,2);
Writeln(' Program Aide Menu');
Writeln;
Writeln(' (C) Copyright 1985 ');
Writeln(' Version 1.00 by Lynn A. Canning');
Writeln;
Writeln;
Writeln(' 1 = Screen Counter');
Writeln(' 2 = Epson Window');
Writeln(' X = Exit');
Writeln;
Writeln(' Option Wanted ');
gotoxy(29,12);
Read(Kbd,ch);
if ch = quit_key then Stay_Xit;
if ch = '2' then
check_printer;
RmWin;
gotoxy(cx,cy);
end;
{-------------------------------------------------------------------------}
{ Main Program }
{-------------------------------------------------------------------------}
begin
cx := wherex;
cy := wherey;
repeat init_window;
until (ch = '1') or (ch = '2') or (upcase(ch) = 'X');
gotoxy(cx,cy);
if ch = '1' then
SC
else
if ch = '2' then
EP;
end;